package dpyNotepad;
import javax.microedition.lcdui.*;

public class InputFileName extends Form {

	private Notepad notepad;
	public TextField textfield;
	
	public InputFileName(String title, Notepad notepad) {
		super(title);
		
		this.notepad = notepad;
		this.textfield = new TextField("FileName: ", this.notepad.fileName, 256, TextField.ANY);

		this.setCommandListener(this.notepad);
		this.addCommand(this.notepad.mainMenuCmd);
		this.addCommand(this.notepad.inputFileNameCmd);
		
		String topRows = "Encoding: " + this.notepad.encoding + "\n\n";
		topRows += ("Folder: \n" + this.notepad.folderPath);
		
		this.append(topRows);
		this.append(this.textfield);
	}

}
